export function deepClone(value) {
    if (typeof value !== 'object' || value === null) {
        return value
    }
    const result = Array.isArray(value) ? [] : {}
    Object.setPrototypeOf(result, Object.getPrototypeOf(value))
    for (const key in value) {
        if (value.hasOwnProperty.call(key)) {
            result[key] = deepClone(value[key])
        }
    }
    return result;
}